$OpenBSD: patch-configure_in,v 1.4 2012/12/21 11:29:20 landry Exp $
--- configure.in.orig	Wed Mar 27 08:59:52 2002
+++ configure.in	Fri Dec 21 04:28:46 2012
@@ -198,21 +198,7 @@ AC_CHECK_LIB(jpeg, jpeg_read_scanlines,
  need_jpeg="yes"
 ])
 
-AC_CHECK_LIB(tiff, TIFFGetField,
-[
-  out_lib="$out_lib -ltiff"
-  echo "TLIB=-ltiff" >> make.conf
-  echo "TIFFDEFINE=-DLOAD_TIF" >>make.conf
-  echo "TIFFINC=" >> make.conf
-  tiff="TIFF"
-],
-[
-  echo "TLIB=" >> make.conf
-  echo "TIFFDEFINE=" >>make.conf
-  echo "TIFFINC=" >> make.conf
-])
 
-
 AC_CHECK_LIB(z, inflate,
 [
  echo "ZINC=" >>make.conf
@@ -227,6 +213,21 @@ AC_CHECK_LIB(z, inflate,
 ])
 
 
+AC_CHECK_LIB(tiff, TIFFGetField,
+[
+  out_lib="$out_lib -ltiff -ljpeg"
+  echo "TLIB=-ltiff -ljpeg" >> make.conf
+  echo "TIFFDEFINE=-DLOAD_TIF" >>make.conf
+  echo "TIFFINC=" >> make.conf
+  tiff="TIFF"
+],
+[
+  echo "TLIB=" >> make.conf
+  echo "TIFFDEFINE=" >>make.conf
+  echo "TIFFINC=" >> make.conf
+], -ljpeg -lz)
+
+
 AC_CHECK_LIB(png, png_get_valid,
 [
  echo "PNGDEFINE=-DLOAD_PNG" >>make.conf
@@ -267,6 +268,7 @@ dnl ---------------------- Checks for library function
 AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
 AC_TYPE_SIGNAL
+AC_CHECK_LIB(util, openpty)
 AC_CHECK_FUNCS( getcwd \
 		mkdir \
 		putenv \
@@ -599,7 +601,7 @@ case "$ARCH" in
   *linux*)
            AC_DEFINE(SO_EXT, "so")
         ;;
-  *hppa*|*hpux*)
+  *hpux*)
         AC_DEFINE(SO_EXT, "so")
         if test "$GCC" = "yes"; then
             LDFLAGS="$LDFLAGS -Wl,-E"
